<template>
  <el-card class="box-card">
    <template #header class="clearfix">
      <!-- 头部插槽内的自定义插槽 -->
      <slot name="headerDiy">
        <el-row style="width:100%" type="flex" justify="space-between">
          <span v-show="isShow" style="line-height:40px">卡片内容-插槽diy</span>
          <el-button type="primary">点击按钮-插槽diy</el-button>
        </el-row>
      </slot>
    </template>
    <!-- 卡片主体内容插槽 -->
    <slot name="body">我是一个名叫body的具名插槽</slot>
  </el-card>
</template>

<script>
export default {
  props: {
    isShow: {
      type: Boolean,
      default: true
    }
  },
  data() {
    return {

    }
  }
}
</script>

<style lang="scss" scoped>
   .el-card{
    margin: 20px;
   }
</style>
